10. Coding Challenge
KOTLIN PART2 L4 A10 Challenge- Customize Your Hunt
In this lesson you only have three geofences in the app, but the maximum is 100! You can add landmarks to customize your hunt and add more to make the treasure hunt last longer. You have everything you need to add another geofence to make your treasure hunt longer!
- In
strings.xmladd in your custom hint and location.
<!-- Geofence Hints -->
<string name="lombard_street_hint">Go to the most crooked street in the City</string>
<!-- Geofence Locations -->
<string name="lombard_street_location">at Lombard Street</string>
- In
GeofenceUtils.kt, you can customize the landmarks by creating aLandmarkDataObjectwith a destination ID, destination hint, destination location, and destination latitude and longitude. Add this to theLANDMARK_DATAarray with your own landmark objects.
val LANDMARK_DATA = arrayOf(
LandmarkDataObject(
“Lombard street”,
R.string.lombard_street_hint,
R.string.lombard_street_location,
LatLng(37.801205, -122.426752))
)